package com.examstack.common.util;

import com.examstack.common.domain.user.User;

import static org.junit.Assert.*;

public class StandardPasswordEncoderForSha1Test {

    @org.junit.Test
    public void encode() {
        User user = new User();
        user.setUserName("admin");
        user.setPassword("adminroot");
        StandardPasswordEncoderForSha1 encoder = new StandardPasswordEncoderForSha1();
        String password = user.getPassword() + "{" + user.getUserName() + "}";
        String encode = encoder.encode(password);
        System.out.println("encode = " + encode);
    }
}